package utils;

import java.io.IOException;
import java.util.Properties;

/**
 * Created with IntelliJ IDEA.
 * User: C13T
 * Date: 10.07.13
 * Time: 19:13
 * To change this template use File | Settings | File Templates.
 */
public class PropertyLoad {

    private static final String PROP_FILE = "/application.properties";

    public static String loadProperty(String name) {
        Properties props = new Properties();
        try {
            props.load(PropertyLoad.class.getResourceAsStream(PROP_FILE));
            }
        catch (IOException e) {
            e.printStackTrace();
        }

        String value = "";

        if (name != null) {
            value = props.getProperty(name);
        }
        return value;
    }
}
